<template>
	<view>
		<view class="Box-b">
		<!-- 左边 -->
		<view class="Boxl">
			<image :src="goods.goods_small_logo || defaultPic" class="Boxl-img"></image>
		</view>
		<!-- 右边 -->
		<view class="Boxr">
			<!-- 标题 -->
			<view class="Boxr-text">
				{{goods.goods_name}}
			</view>
			<!-- 金额 -->
			<view class="Boxr-my">
				￥{{goods.goods_price  |fo()}}
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-goods",
		props:{
			goods:{
				type:Object,
				default:{}
			}
		},
		data() {
			return {
			
				// 默认照片
				defaultPic:'https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png'
			};
		},
		// 过滤器
		filters:{
			// 处理金额的过滤器
			fo(d){
				return Number(d).toFixed(2)
			}
		}

	}
</script>

<style lang="scss">
	.Box-b{
		display: flex;
		border-bottom: 1px solid #f0f0f0f0;
		padding: 5px 7px;
		.Boxl{
			.Boxl-img{
				width: 100px;
				height: 100px;
				margin-right: 5px;
			}
		}
		.Boxr{
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			.Boxr-text{
				font-size: 12px;
			}
			.Boxr-my{
				font-size: 16px;
				color: #c00000;
			}
		}
	}
</style>
